package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 人车报警记录表
 *
 * @author code-generate
 * @date 2022-01-18
 */
@Data
@DbTable(tableName = "t_give_an_alarm")
public class GiveAnAlarm extends BaseEntity {
        /**
     * 人员姓名/车牌
     */
    @DbTableField(columnName = "c_obj_name", dbType = DbTypeEnum.VARCHAR)
    public String objName ;

    /**
     * 人员/车 id
     */
    @DbTableField(columnName = "c_obj_id", dbType = DbTypeEnum.VARCHAR)
    public String objId ;

    /**
     * 人员/车 id int
     */
    @DbTableField(columnName = "c_obj_id_int", dbType = DbTypeEnum.INTEGER)
    public Integer objIdInt ;

    /**
     * 0 人 1 车
     */
    @DbTableField(columnName = "c_obj_type", dbType = DbTypeEnum.SMALLINT)
    public Short objType ;

    /**
     * 片区
     */
    @DbTableField(columnName = "c_extent_name", dbType = DbTypeEnum.VARCHAR)
    public String extentName ;

    /**
     * 班次
     */
    @DbTableField(columnName = "c_duty_name", dbType = DbTypeEnum.VARCHAR)
    public String dutyName ;

    /**
     * 1、可能迟到 2、可能脱岗 3、持续静止 	4、设备关机 	5、设备低电关机
     */
    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.SMALLINT)
    public Short type ;

    /**
     * 报警开始时间
     */
    @DbTableField(columnName = "c_begin_time", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime beginTime ;

    /**
     * 报警结束时间
     */
    @DbTableField(columnName = "c_end_time", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime endTime ;

    /**
     * 排班时段
     */
    @DbTableField(columnName = "c_work_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime workDate ;

    /**
     * 0 预警持续中 1 预警解除 2 预警结束 3 预警已处理
     */
    @DbTableField(columnName = "c_status", dbType = DbTypeEnum.SMALLINT)
    public Short status ;


}
